home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 001 / pibt40s4.arc / PROCESSC.MOD < prev    next >
Text File  |  1987-02-28  |  5KB  |  81 lines

  1. (*----------------------------------------------------------------------*)
  2. (*           Process_Command --- Process PibTerm  command               *)
  3. (*----------------------------------------------------------------------*)
  4.  
  5. PROCEDURE Process_Command( VAR Ch       : CHAR;
  6.                                Use_Ch   : BOOLEAN;
  7.                            VAR Command  : PibTerm_Command_Type );
  8.  
  9. (*----------------------------------------------------------------------*)
  10. (*                                                                      *)
  11. (*     Procedure:  Process_Command                                      *)
  12. (*                                                                      *)
  13. (*     Purpose:    Process PibTerm Command escape sequence              *)
  14. (*                                                                      *)
  15. (*     Calling Sequence:                                                *)
  16. (*                                                                      *)
  17. (*        Process_Command(     VAR Ch  : CHAR;                          *)
  18. (*                             Use_Ch  : BOOLEAN;                       *)
  19. (*                         VAR Command : PibTerm_Command_Type );        *)
  20. (*                                                                      *)
  21. (*           Done    --- set TRUE if termination command (Alt-X) found  *)
  22. (*           Ch      --- character following ESC                        *)
  23. (*           Use_Ch  --- TRUE if Ch on entry is char following ESC,     *)
  24. (*                       FALSE if Ch to be read here.                   *)
  25. (*           Command --- Command to be executed                         *)
  26. (*                                                                      *)
  27. (*      Remarks:                                                        *)
  28. (*                                                                      *)
  29. (*         All PibTerm commands are implemented as escape sequences,    *)
  30. (*         very much like PC-TALK or QMODEM.  The available commands    *)
  31. (*         are:                                                         *)
  32. (*                                                                      *)
  33. (*            Alt-A:  Alter (block) mode                                *)
  34. (*            Alt-B:  Send Break                                        *)
  35. (*            Alt-C:  Clear Screen                                      *)
  36. (*            Alt-D:  Dial a number                                     *)
  37. (*            Alt-E:  Turn local echo ON/OFF                            *)
  38. (*            Alt-F:  File manipulation                                 *)
  39. (*            Alt-G:  Gossip (chat) mode                                *)
  40. (*            Alt-H:  Hang up the phone                                 *)
  41. (*            Alt-I:  Display program information (help)                *)
  42. (*            Alt-J:  Jump to DOS                                       *)
  43. (*            Alt-K:  Set function keys                                 *)
  44. (*            Alt-L:  Log session to printer                            *)
  45. (*            Alt-M:  Toggle Mute/Sound Mode                            *)
  46. (*            Alt-N:  New communications params                         *)
  47. (*            Alt-O:  Output session to disk                            *)
  48. (*            Alt-P:  Set communications parameters                     *)
  49. (*            Alt-Q:  Redial last number dialed                         *)
  50. (*            Alt-R:  Receive a file from remote                        *)
  51. (*            Alt-S:  Send file to remote                               *)
  52. (*            Alt-T:  Set up translate table                            *)
  53. (*            Alt-U:  Screen dump                                       *)
  54. (*            Alt-V:  Review captured text                              *)
  55. (*            Alt-W:  Set host mode (wait for call)                     *)
  56. (*            Alt-X:  Leave Program                                     *)
  57. (*            Alt-Y:  Examine timers                                    *)
  58. (*            Alt-Z:  Area code search                                  *)
  59. (*                                                                      *)
  60. (*----------------------------------------------------------------------*)
  61.  
  62. BEGIN (* Process_Command *)
  63.                                    (* Pick up character following escape *)
  64.    IF ( NOT Use_Ch ) THEN
  65.       READ( Kbd , Ch );
  66.                                    (* Remember it                        *)
  67.    Key_No  := ORD( Ch );
  68.                                    (* Get corresponding command type     *)
  69.  
  70.    Command := PibTerm_Command_Table[ Key_No ];
  71.  
  72.                                    (* Ensure script strings are null     *)
  73.    IF ( NOT Script_Learn_Mode ) THEN
  74.       BEGIN
  75.          Script_String[0]    := #0;
  76.          Script_String_2[0]  := #0;
  77.          Script_Integer_1    := 0;
  78.       END;
  79.  
  80. END   (* Process_Command *);
  81.